home *** CD-ROM | disk | FTP | other *** search
/ Supercompiler 1997 / SUPERCOMPILER97.iso / BC++ Builder / DATA.Z / IBREG.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1997-02-10  |  1.6 KB  |  51 lines

  1. //---------------------------------------------------------------------------
  2. // Borland C++Builder
  3. // Copyright (c) 1987, 1996 Borland International Inc.  All Rights Reserved.
  4. //---------------------------------------------------------------------------
  5. #pragma hdrstop
  6. #include <dsgnintf.hpp>
  7. #include <memory>       //for STL auto_ptr
  8. #if !defined (REGISTER_ALL_CONTROLS)
  9.   #include "ibreg.h"
  10.   #include "ibctrls.cpp"
  11.   #include "ibevnts.cpp"
  12. #else
  13.   #include "source\ibreg.h"
  14.   #include "source\ibctrls.cpp"
  15.   #include "source\ibevnts.cpp"
  16. #endif
  17.  
  18. //#pragma resource "*.res"   //IDE links .res automatically for components
  19.  
  20. __fastcall TIBEventListProperty::TIBEventListProperty(void)
  21.                                 : TClassProperty() { }
  22. __fastcall TIBEventListProperty::~TIBEventListProperty(void){}
  23.  
  24.  TPropertyAttributes __fastcall TIBEventListProperty::GetAttributes()
  25. {
  26.   return  (TClassProperty::GetAttributes() << paDialog ) >> paSubProperties;
  27. }
  28.  
  29. void __fastcall TIBEventListProperty::Edit()
  30. {
  31.   std::auto_ptr<TStringList> Events(new TStringList());
  32.   Events->Assign((TStrings*)GetOrdValue());
  33.   if(Ibevnts::EditAlerterEvents(Events.get()))
  34.     SetOrdValue(long(Events.get()));
  35. }
  36.  
  37. namespace Ibreg
  38. {
  39. void __fastcall Register()
  40. {
  41.   TComponentClass classes[1] = {__classid(TIBEventAlerter)};
  42.   RegisterComponents("Samples", classes, 0);
  43.   RegisterPropertyEditor(__typeinfo(TStrings),
  44.                          __classid(TIBEventAlerter),
  45.                          "Events",
  46.                          __classid(TIBEventListProperty));
  47. }
  48. }       /* namespace Ibreg */
  49.  
  50.  
  51.